<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/com/com.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
<title>update</title>
<!-- 县 -->
<script type="text/javascript" >
 $(document).ready(function(){
		$(".CountId").each(function(){//循环获取所有单位编号 
			var sysCountId = $(this).attr("value");
			var countId = $("#sysZuSysCountId").attr("value");
			if(sysCountId == countId){
				$(this).attr("selected","selected");				
		}	
		});
	 });
</script>
<!-- 镇 -->
<script type="text/javascript" >
 $(document).ready(function(){
		$(".TownId").each(function(){//循环获取所有单位编号 
			var sysTownId = $(this).attr("value");
			var townId = $("#sysZuSysTownId").attr("value");
			if(sysTownId == townId){
				$(this).attr("selected","selected");				
		}	
		});
	 });
</script>
<!-- 村 -->
<script type="text/javascript" >
 $(document).ready(function(){
		$(".VillageId").each(function(){//循环获取所有单位编号 
			var villageId = $(this).attr("value");
			var village = $("#sysZuVillageId").attr("value");
			if(villageId == village){
				$(this).attr("selected","selected");				
		}	
		});
	 });
</script>
</head>
  
  <body>
   <div class="panel admin-panel">
  <div class="panel-head"><strong><span class="icon-key"></span></strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="<%=basePath%>/sys/SysZu_update.action">
    <input type="hidden" name="id" value="${sysZu.id}" >
    
    <div class="form-group">
          <div class="label">
            <label>县：</label>
          </div>
          <div class="field">
          <select name="countId"  class="input w50">
             <option value="">县分类</option>
				<s:iterator value="sysCountAllList">
				<option class="CountId" value="${countId}" id="${countId}">${countName}</option>
				</s:iterator>
            </select>
            <div class="tips"></div>
          </div>
    </div>
    
    <div class="form-group">
          <div class="label">
            <label>镇：</label>
          </div>
          <div class="field">
          <select name="townId"  class="input w50">
             <option value="">镇分类</option>
				<s:iterator value="sysTownAllList">
				<option  class="TownId" value="${sysTownId}" id="${sysTownId}">${sysTownName}</option>
				</s:iterator>
            </select>
            <div class="tips"></div>
          </div>
    </div>
     <div class="form-group">
          <div class="label">
            <label>村：</label>
          </div>
          <div class="field">
          <select name="villageId"  class="input w50">
             <option value="">村分类</option>
				<s:iterator value="sysVillageAllList">
				<option  class="VillageId" value="${villageId}" id="${villageId}">${villageName}</option>
				</s:iterator>
            </select>
            <div class="tips"></div>
          </div>
    </div>
    <div class="form-group">
        <div class="label">
          <label for="sitename">组编码：</label>
        </div>
        <div class="field">
           <input type="test" class="input w50" id="zuId" name="zuId" value="${sysZu.zuId}" size="50" placeholder="请输入组编号" data-validate="required:请输入组编号" />   
        </div>
      </div> 
     <div class="form-group">
        <div class="label">
          <label for="sitename">组名：</label>
        </div>
        <div class="field">
           <input type="test" class="input w50" id="zuName" name="zuName" value="${sysZu.zuName}" size="50" placeholder="请输入组名" data-validate="required:请输入组编号" />   
        </div>
      </div> 
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>   
        </div>
      </div>      
    </form>
  </div>
</div>
 <input name="sysZu.countId" type="hidden" id="sysZuSysCountId" value="${sysZu.countId}"/>  <!-- 用于下拉选择的读取-县 -->
 <input name="sysZu.townId" type="hidden" id="sysZuSysTownId" value="${sysZu.townId}"/>  <!-- 用于下拉选择的读取-镇 -->
 <input name="sysZu.villageId" type="hidden" id="sysZuVillageId" value="${sysZu.villageId}"/>  <!-- 用于下拉选择的读取-村-->
  </body>
</html>
